﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Shapes;

namespace Entangle.Resources.Windows
{
    /// <summary>
    /// Interaction logic for ExitDialog.xaml
    /// </summary>
    public partial class ExitDialog : Window
    {
        public ExitDialog()
        {
            this.Initialized += new EventHandler(ExitDialog_Initialized);
            InitializeComponent();
        }

        void ExitDialog_Initialized(object sender, EventArgs e)
        {
            this.Left = System.Windows.Forms.Screen.PrimaryScreen.Bounds.Width - this.Width - 10;
            this.Top = System.Windows.Forms.Screen.PrimaryScreen.Bounds.Height - this.Height - 10;
        }
        
        public void move_window(object sender, MouseButtonEventArgs e)
        {
            this.DragMove();
        }

        private void Button_MouseEnter(object sender, MouseEventArgs e)
        {
            closeButtonPen.Brush = new SolidColorBrush(Colors.Orange);
        }

        private void Button_MouseLeave(object sender, MouseEventArgs e)
        {
            closeButtonPen.Brush = new SolidColorBrush(Colors.Black);
        }
        private void btnExit_Click(object sender, RoutedEventArgs e)
        {
            DialogResult = true;
            if ((bool)chkQuitWithoutAsking.IsChecked)
                Configuration.AskOnExit = false;
            Close();
        }

        private void btnCancel_Click(object sender, RoutedEventArgs e)
        {
            DialogResult = false;
            Close();
        }

    }
}
